import App from './src/views/App'
import About from './src/views/About'
import UserInfo from './src/views/UserInfo'
import ToDoList from './src/views/ToDoList'
import ReactDom from 'react-dom'
import React from 'react'
import store from './src/store'
import { Provider } from 'react-redux'
import routes from './src/router'
import { renderRoutes } from 'react-router-config'
import { HashRouter as Router, Route, Switch } from 'react-router-dom'

ReactDom.render(
  <Provider store={store}>
    <Router>
      <Switch>
        <Route path="/" exact component={App} />
        <Route path="/todolist" component={ToDoList} />
        <Route path="/about" component={About} />
        <Route path="/userInfo" component={UserInfo} />
        {renderRoutes(routes)}
      </Switch>
    </Router>
  </Provider>,
  document.getElementById('root')
)
